<template>
  <div class="container">
    <div class="logo-container">
      <img alt="Vue logo" src="./assets/logo.png" class="logo">
    </div>
    
    <div class="input-container">
      <h2>实时输入</h2>
      <div class="input-group">
        <input v-model="inputText" placeholder="请输入内容" class="input-field">
        <button @click="clearInput" class="clear-button">清空</button>
      </div>
      <div class="output" v-if="inputText">
        {{ inputText }}
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'App',
  data() {
    return {
      inputText: ''
    }
  },
  methods: {
    clearInput() {
      this.inputText = '';
    }
  }
}
</script>

<style>
.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.logo-container {
  text-align: center;
  margin-bottom: 30px;
}

.logo {
  height: 150px;
}

.input-container {
  width: 100%;
  max-width: 500px;
  text-align: center;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.input-group {
  display: flex;
  margin-bottom: 20px;
}

.input-field {
  flex: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-right: 10px;
}

.clear-button {
  padding: 10px 15px;
  background-color: #42b983;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.clear-button:hover {
  background-color: #3aa876;
}

.output {
  margin-top: 20px;
  padding: 15px;
  background-color: #f9f9f9;
  border-radius: 4px;
  min-height: 50px;
  text-align: left;
}

h2 {
  color: #42b983;
}
</style>